#include<stdio.h>
int main()
{
  int a;
  scanf("%d", &a);
  int m = (a%10)*100 + (a/10%10)*10 + a/100;
  printf("%03d\n",m);
  return 0;
}
